﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <!--<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=56c55e968941447f6c627a1ec89bcc9f"></script>-->
    <script src="http://api.map.baidu.com/api?v=1.5" type="text/javascript"></script>
    <script type="text/javascript">
        function Call() {
            var map = new BMap.Map("allmap");// 创建Map实例

            var pointA = new BMap.Point(116.404, 39.915);
            var pointB = new BMap.Point(116.404, 39.91);
            alert(map.getDistance(pointA, pointB));
        }
    </script>
</head>
<body>
     <input type="button" value="计算距离" onclick="Call();" />
</body>
</html>
